from locust import HttpUser, task, between


class FastAPITestUser(HttpUser):
    wait_time = between(1, 3)  # 每次请求间隔 1~3 秒

    @task
    def test_schedule(self):
        self.client.get("/schedule")

# 运行
# locust -f 压测.py --host=http://localhost:8080
